package top.wfzzq.tds;

public class MyNodeDemo {
	public static void main(String[] args) {

		MyNode<Integer> intn = new MyNode<Integer>(100);
		//创建节点
		MyNode<String> n1 = new MyNode<String>("郑志强");
		MyNode<String> n2 = new MyNode<String>("王辉");
		MyNode<String> n3 = new MyNode<String>("槈");
		
		//关联关系
		n1.setNext(n2);
		n2.setNext(n3);
		
		//遍历
		for(MyNode<String> node=n1;node!=null;node=node.getNext()) {
			System.out.println(node.getData());
		}
	}
}
